package com.ruoyi.common.core.constant;

/**
 * @
 */
public class RabbitMqConstants {
    //msgId前缀
    public static final String CORRELATION_ID = "CORRELATION_ID:";
    //从message头中获取msgId
    public static final String MESSAGE_CORRELATION = "spring_returned_message_correlation";
    //重试发送次数前缀
    public static final String MAIL_SEND_RETRY_COUNT = "MAIL_SEND_RETRY_COUNT:";
    //email交换机 主交换机 用于投递消息
    public static final String EMAIL_EXCHANGE = "emailExchange";
    //failed交换机 失败交换机 用于接收投递失败的消息
    public static final String FAILED_EXCHANGE = "failedExchange";
    //retry交换机 重试交换机 用于重试投递
    public static final String RETRY_EXCHANGE = "retryExchange";
    //email交换机的路由key 由email发出
    public static final String EMAIL_DELIVER_ROUTING_KEY = "email.email.deliver";
    //email交换机的路由key 由retry发出
    public static final String EMAIL_RETRY_ROUTING_KEY = "email.email.retry";
    //retry交换机的路由key 由retry发出
    public static final String RETRY_RETRY_ROUTING_KEY = "email.retry.retry";
    //failed交换机的路由key 由failed发出
    public static final String FAILED_DELIVER_ROUTING_KEY = "email.failed.deliver";
    //failed交换机的路由key 由重试3次后转投至failed交换机
    public static final String FAILED_RETRY_ROUTING_KEY = "email.failed.retry";
    //email队列
    public static final String EMAIL_QUEUE = "emailQueue";
    //failed队列
    public static final String FAILED_QUEUE = "failedQueue";
    //retry队列
    public static final String RETRY_QUEUE = "retryQueue";
    public static final String X_DEL_EXCHANGE = "x-dead-letter-exchange";
    public static final String X_DEL_ROUTING_KEY = "x-dead-letter-routing-key";
    public static final String X_DEL_TTL = "x-message-ttl";

    public static final Integer SUCCESS = 1;//消息投递成功
    public static final Integer FAILURE = 0;//消息投递失败
    public static final Integer DELIVERING = 2;//消息投递中

}
